<?xml version="1.0" encoding="Windows-1251"?>
<!DOCTYPE hrc PUBLIC "-//Cail Lomecb//DTD Colorer HRC take5//EN"
  "http://colorer.sf.net/2003/hrc.dtd">
<hrc version="take5" xmlns="http://colorer.sf.net/2003/hrc"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://colorer.sf.net/2003/hrc http://colorer.sf.net/2003/hrc.xsd">

  <type name="mako">

      <annotation>
         <documentation><![CDATA[
           Mako Templates for Python
         ]]></documentation>
         <contributors>
           Mikael Lepisto (elhigu@gmail.com)
         </contributors>
      </annotation>

      <import type="def"/>
      <import type="python"/>
      <import type="html"/>
      
      <region name="MakoTag"/>
      <region name="PythonBlock" parent="def:InsertionEmbed" />
            
      <scheme name="mako">
        
        <inherit scheme="html:html"/>
        
        <!-- NOTE: html blocks do not use mako schema 
             e.g. mako does not work inside <h3> tag -->
        
        <block start="/##/" end="/$/" scheme="def:Comment" region="def:LineComment"/>

        <!-- python colorization to mako tags -->
        <block start="/(?{def:PairStart}&lt;%def.*&gt;)/" end="/(?{def:PairEnd}&lt;/%def&gt;)/" scheme="mako" region="MakoTag"/>
        <block start="/(?{def:PairStart}&lt;%(doc|textpage|include|namespace|inherit|call))/" 
               end="/(?{def:PairEnd}(&gt;|$))/" 
               scheme="python:python" region="MakoTag"/>

        <!-- Python blocks --> 
        <block start="/(?{def:PairStart}&lt;%)/" end="/(?{def:PairEnd}%&gt;)/" scheme="python:python" region="PythonBlock"/>
        <block start="/(?{def:PairStart}\$\{)/" end="/(?{def:PairEnd}\})/" scheme="python:python" region="PythonBlock"/>
        <block start="/^\s*%/" end="/$/" scheme="python:python" region="PythonBlock"/>
        
      </scheme>
  </type>
</hrc>
